package com.zb.factory.controller;


import com.zb.result.PageUtil;
import com.zb.result.Result;
import com.zb.service.ZjFactoryAccountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 厂商账号表 前端控制器
 * </p>
 *
 * @author WEN
 * @since 2024-02-27
 */
@Api(tags = "品牌商家账号类接口")
@RestController
@RequestMapping("/factory/account")
public class ZjFactoryAccountController {
    @Resource
    private ZjFactoryAccountService factoryAccountService;

    @ApiOperation("根据手机号获取品牌商家账号")
    @GetMapping("/getByPhone/{phone}")
    public Result getByPhone(@PathVariable @ApiParam(value = "手机号", required = true) String phone) {
        return Result.success("获取品牌商家账号成功").data(PageUtil.row(factoryAccountService.getByPhone(phone)));
    }



}
